{% extends "base.html" %}

{% block sidebar1 %}
<a href="/" title="Home"><img src="{{ STATIC_URL }}images/tabs/tab_home.jpg"/></a><br/><br/>
<a href="/myprofile/review/{{ currentUser.abstract_user.id }}">
{% if profileOwner and currentUser.abstract_user.reviews_notification > 0 %}

	{% if currentUser.abstract_user.reviews_notification == 1 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews1.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 2 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews2.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 3 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews3.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 4 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews4.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 5 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews5.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 6 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews6.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 7 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews7.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 8 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews8.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification == 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews9.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.reviews_notification > 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews9p.jpg"/>
	{% endif %}
{% else %}
	{% if profileOwner %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews.jpg"/>
	{% else %}
		<img src="{{ STATIC_URL }}images/tabs/tab_reviews_blue.jpg"/>
	{% endif %}
{% endif %}</a><br/><br/>

<a href="/myprofile/connections/{{ currentUser.abstract_user.id }}/">
{% if profileOwner and currentUser.abstract_user.connections_notification > 0 %}
	{% if currentUser.abstract_user.connections_notification == 1 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections1.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 2 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections2.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 3 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections3.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 4 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections4.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 5 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections5.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 6 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections6.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 7 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections7.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 8 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections8.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification == 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections9.jpg"/>
	{% endif %}
	{% if currentUser.abstract_user.connections_notification > 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections9p.jpg"/>
	{% endif %}
{% else %}
	{% if profileOwner %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections.jpg"/>
	{% else %}
		<img src="{{ STATIC_URL }}images/tabs/tab_connections_red.jpg"/>
	{% endif %}
{% endif %}</a><br/><br/>

<a href="/messaging/">
{% if loggedinUser.abstract_user.messages_notification > 0 %}
	{% if loggedinUser.abstract_user.messages_notification == 1 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages1.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 2 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages2.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 3 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages3.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 4 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages4.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 5 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages5.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 6 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages6.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 7 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages7.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 8 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages8.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification == 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages9.jpg"/>
	{% endif %}
	{% if loggedinUser.abstract_user.messages_notification > 9 %}
		<img src="{{ STATIC_URL }}images/tabs/tab_messages9p.jpg"/>
	{% endif %}
{% else %}
	<img src="{{ STATIC_URL }}images/tabs/tab_messages.jpg"/>	
{% endif %}</a><br/><br/>

{% if not currentUser.category == "student" %}
	{% if profileOwner %}
		<a href="/myprofile/addSlot/">
	{% else %}
		<a href="/myprofile/schedule/{{ currentUser.abstract_user.id }}/">
	{% endif %}
	<img src="{{ STATIC_URL }}images/tabs/tab_schedule.jpg"/></a><br/><br/>
{% endif %}

{% if currentUser.category == 'institute' %}
	<a href="/myprofile/photos/{{ currentUser.abstract_user.id }}/"><img src="{{ STATIC_URL }}images/tabs/tab_photos.jpg"/></a><br/><br/>
{% endif %}

{% if not profileOwner %}
	{% if not areFriends %}
		{% if requestedFriend %}
			<a href="/myprofile/{{ currentUser.abstract_user.id }}"><img src="{{ STATIC_URL }}images/tabs/tab_awaitingres.jpg"/></a><br/><br/>
		{% else %}
			{% if friendRequested %}
				<a href="/myprofile/connections/{{ loggedinUser.abstract_user.id }}/"><img src="{{ STATIC_URL }}images/tabs/tab_respondFR.jpg"/></a><br/><br/>
			{% else %}
				<a href="/myprofile/sendFriendRequest/{{ currentUser.abstract_user.id }}/"><img src="{{ STATIC_URL }}images/tabs/tab_addfriend.jpg"/></a><br/><br/>
			{% endif %}
		{% endif %}
	{% endif %}
	
	{% if not currentUser.category == "student" and not loggedinUser.category == 'student' and currentUser.category != loggedinUser.category and not areConnected %}
			{% if requestedWork %}
				<a href="/myprofile/{{ currentUser.abstract_user.id }}"><img src="{{ STATIC_URL }}images/tabs/tab_awaitingconf.jpg"/></a><br/><br/>
			{% else %}					
				{% if workRequested %}
					<a href="/myprofile/connections/"><img src="{{ STATIC_URL }}images/tabs/tab_respondemp.jpg"/></a><br/><br/>
				{% else %}
					<a href="/myprofile/sendEmploymentRequest/{{ currentUser.abstract_user.id }}/"><img src="{{ STATIC_URL }}images/tabs/tab_sendemp.jpg"/></a><br/><br/>
				{% endif %}
			{% endif %}
	{% endif %}
{% endif %}	

<a href="/myprofile/getUpdated/"><img src="{{ STATIC_URL }}images/tabs/tab_getupdated.jpg"/></a><br/><br/>
<a href="/logout"><img src="{{ STATIC_URL }}images/tabs/tab_logout.jpg"/></a><br/><br/>
{% endblock %}
